home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.3 (Developer)…68k, x86, SPARC, PA-RISC] / NeXTSTEP 3.3 Dev Intel.iso / usr / sybase / doc / dbcount.man < prev    next >
Text File  |  1993-04-22  |  2KB  |  67 lines

  1.  
  2.   1                       Version 4.0 -- 5/1/89                  DBCOUNT
  3.   ______________________________________________________________________
  4.  
  5.   NAME:  DBCOUNT
  6.  
  7.   FUNCTION:
  8.        Return the number of rows affected by a Transact-SQL command.
  9.  
  10.   SYNTAX:
  11.        DBINT DBCOUNT(dbproc)
  12.  
  13.        DBPROCESS *dbproc;
  14.  
  15.   COMMENTS:
  16.  
  17.        o Once the results of a command have been processed, you can call
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.   DBCOUNT                 Version 4.0 -- 5/1/89                        2
  25.   ______________________________________________________________________
  26.          DBCOUNT() to find out how many rows were affected by  the  com-
  27.          mand.   For example, if a SELECT command was sent to SQL Server
  28.          and you have read all the rows by calling dbnextrow() until  it
  29.          returned  NO_MORE_ROWS, you can call this macro to find out how
  30.          many rows were retrieved.
  31.  
  32.        o If the current command is one that doesn't return rows,  (e.g.,
  33.          a   DELETE),   you   can   call   DBCOUNT()  immediately  after
  34.          dbresults().
  35.  
  36.   PARAMETERS:
  37.        dbproc -  A pointer to the DBPROCESS structure that provides  the
  38.            connection for a particular front-end/SQL Server process.  It
  39.            contains all the information that DB-Library uses  to  manage
  40.            communications and data between the front end and SQL Server.
  41.  
  42.   RETURNS:
  43.        The number of rows affected by the  command,  or  -1.   DBCOUNT()
  44.  
  45.  
  46.   3                       Version 4.0 -- 5/1/89                  DBCOUNT
  47.   ______________________________________________________________________
  48.        will return -1 if any of the following are true:
  49.  
  50.        o The Transact-SQL command fails for any reason, such as a syntax
  51.          error.
  52.        o The command is one that never affects rows,  such  as  a  PRINT
  53.          command.
  54.  
  55.        o The DBNOCOUNT option is on.
  56.  
  57.   SEE ALSO:
  58.        dbnextrow, dbresults, options
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.